﻿using Joy.Erp.BasicArchives.Core;
using Joy.Erp.BasicArchives.Core.EntityAttributes;
using Joy.Erp.BasicArchives.Core.UniqueCodes;
using Joy.Erp.BasicArchives.Staff;
using System;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;

namespace Joy.Erp.BasicArchives.Storage
{
    /// <summary>
    /// 仓库
    /// </summary>
    public class Warehouse : ArchiveAggregateRoot, IMultiTenant, IUniqueCode, IHasConcurrencyStamp
    {
        /// <summary>
        /// 所属租户
        /// </summary>
        public Guid? TenantId { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        [Unique]
        public string Name { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public Guid? OperatorId { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public Operator Operator { get; set; }

        /// <summary>
        /// 允许负库存
        /// </summary>
        public bool AllowNegativeInventory { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool Enabled { get; set; }
    }
}
